package com.example.graduatetest.activitys;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.lifecycle.ViewModelProviders;

import android.content.Intent;
import android.os.Bundle;

import com.example.graduatetest.R;
import com.example.graduatetest.bean.Classes;
import com.example.graduatetest.databinding.ActivityChangePasswordBinding;
import com.example.graduatetest.databinding.ActivityClassDetailBinding;
import com.example.graduatetest.view.model.ChangePasswordViewModel;
import com.example.graduatetest.view.model.ClassDetailViewModel;

public class ChangePasswordActivity extends AppCompatActivity {

    private ActivityChangePasswordBinding binding;
    private ChangePasswordViewModel changePasswordViewModel;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_change_password);
        //隐藏ActionBar
        if(getSupportActionBar() != null){
            ActionBar actionBar = getSupportActionBar();
            actionBar.hide();
        }
        binding = DataBindingUtil.setContentView(this,R.layout.activity_change_password);


        //LiveData
        changePasswordViewModel = ViewModelProviders.of(this).get(ChangePasswordViewModel.class);
        binding.setChangePasswordViewModel(changePasswordViewModel);
        binding.setLifecycleOwner(this);
        changePasswordViewModel.init(this,binding);
    }
}
